package com.lkc.utils.security;

import com.lkc.domain.entity.User;

/**
 * @Title: LoginUser
 * @Author 椰咩咩
 * @Package com.lkc.utils.security
 * @Date 2022/12/23 23:37
 * @description: 登录的user
 */
public class LoginUser {

    public static User user;

    public static User getUser() {
        return user;
    }

    public static void setUser(User user) {
        LoginUser.user = user;
    }

    public static boolean isTeacher() {
        return user.getRole().equals("1");
    }

    public static boolean isStudent() {
        return user.getRole().equals("0");
    }

    public static Long getLoginUserId() {
        return user.getId();
    }
}
